import request from '@/utils/request'

export function userPage({id,no,name,password,sex,roleId,phone,isvalid,page,pageSize}) {
    return request({
        url: 'user/page',
        method: 'get',
        params: {
            id,
            no,
            name,
            password,
            sex,
            roleId,
            phone,
            isvalid,
            page,
            pageSize
        }
    })
}
export function addUser(User) {
    return request({
        url: 'user/save',
        method: 'post',
        data: User,
    })
}

export function getById(id) {
    return request({
        url: 'user/'+id,
        method: 'delete',
    })
}

export function selectById(id) {
    return request({
        url: 'user/'+id,
        method: 'get',
    })
}

export function update(User) {
    return request({
        url: 'user/update',
        method: 'put',
        data : User
    })
}
